const BASE_URL = 'https://tea.qingnian8.com/api/bizhi'
// 封装request请求
export function request(config = {}) {
	// 解构参数
	let {
		url,
		method = 'GET',
		header = {}
	} = config
	url = BASE_URL + url
	header['access-key'] = '12345'
	header['token'] = ''
	return new Promise((resolve, reject) => {
		uni.request({
			url: url,
			method: method,
			header: {
				'access-key': '123'
			},
			success: res => {
				resolve(res)

			},
			fail: res => {
				reject(err)
			}
		})
	})
}